#pragma once

#include <vector>
#include "..\\SGD Wrappers\\SGD_Geometry.h"
#include "Map.h"

class GameObject;

namespace SGD
{
	class GraphicsManager;
	class Point;
}

class TileSystem
{
	static TileSystem*		instance;
	SGD::GraphicsManager*	graphics	= nullptr;
	std::vector<Map>		maps;
	
	TileSystem	(void) = default;
	~TileSystem	(void) = default;
public:
	//Singleton Accessors
	static TileSystem*	GetInstance		(void);
	static void			DeleteInstance	(void);

	int		Load			(std::string path, std::string filename);
	void	Unload			(void);
	void	Render			(int mapID, SGD::Point camera, float screenWidth, float screenHeight);
	void	CheckCollison	(int mapID, GameObject* Object);
	bool	CheckCollison	(int mapID, SGD::Point position);
	void	StartLevel		(int mapID);
	void	SpawnEnemies	(int mapID);
	void	TurnOffTile		(int mapID, SGD::Point);

	float	GetMapWidth		(int mapID) const { return maps[mapID].GetMapWidth(); }
	float	GetMapHeight	(int mapID) const { return maps[mapID].GetMapHeight(); }
};

